import request from '@/utils/request'

export function addScore(storeId, score) {
  return request.post('/score/add', { storeId, score })
}

export function fetchList(query) {
  return request({
    url: '/score/list',
    method: 'get',
    params: query
  })
}

/**
 * 获取用户跑分信息
 * @param {*} userId 用户ID
 */
export function info(userId) {
  return request({
    url: '/score/info',
    method: 'get',
    params: { userId }
  })
}
